package com.zx.service;

import com.zx.bean.Firm;
import com.zx.mapper.FirmMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FirmService {

    @Autowired
    private FirmMapper firmMapper;
    //添加
    public int addFirm(Firm firm){
        return firmMapper.addFirm(firm);
    }
    //删除
    public int delFirm(int id){
        return firmMapper.delFirm(id);
    }
    //修改
    public Firm updateFirm(int id){
        return firmMapper.updateFirm(id);
    }
    //查询单个
    public Firm findOneFirm(int id){
        return firmMapper.findOneFirm(id);
    }
    //查询全部
    public List<Firm> findAllFirm(){
        return firmMapper.findAllFirm();
    }
}
